3.201 \(\int \frac{\sec (e+f x) (a+a \sec (e+f x))^2}{(c+d \sec (e+f x))^5} \, dx\)

Optimal. Leaf size=276 \[ \frac{a^2 \left (12 c^2-16 c d+7 d^2\right ) \tanh ^{-1}\left (\frac{\sqrt{c-d} \tan \left (\frac{1}{2} (e+f x)\right )}{\sqrt{c+d}}\right )}{4 f (c-d)^{5/2} (c+d)^{9/2}}+\frac{a^2 \left (16 c^2 d+2 c^3-59 c d^2+32 d^3\right ) \tan (e+f x)}{24 d f (c-d)^2 (c+d)^4 (c+d \sec (e+f x))}+\frac{a^2 \left (2 c^2+16 c d-21 d^2\right ) \tan (e+f x)}{24 d f (c-d) (c+d)^3 (c+d \sec (e+f x))^2}+\frac{a^2 (c+8 d) \tan (e+f x)}{12 d f (c+d)^2 (c+d \sec (e+f x))^3}-\frac{a^2 (c-d) \tan (e+f x)}{4 d f (c+d) (c+d \sec (e+f x))^4} \]

[Out]

(a^2*(12*c^2 - 16*c*d + 7*d^2)*ArcTanh[(Sqrt[c - d]*Tan[(e + f*x)/2])/Sqrt[c + d]])/(4*(c - d)^(5/2)*(c + d)^(
9/2)*f) - (a^2*(c - d)*Tan[e + f*x])/(4*d*(c + d)*f*(c + d*Sec[e + f*x])^4) + (a^2*(c + 8*d)*Tan[e + f*x])/(12
*d*(c + d)^2*f*(c + d*Sec[e + f*x])^3) + (a^2*(2*c^2 + 16*c*d - 21*d^2)*Tan[e + f*x])/(24*(c - d)*d*(c + d)^3*
f*(c + d*Sec[e + f*x])^2) + (a^2*(2*c^3 + 16*c^2*d - 59*c*d^2 + 32*d^3)*Tan[e + f*x])/(24*(c - d)^2*d*(c + d)^
4*f*(c + d*Sec[e + f*x]))

________________________________________________________________________________________

Rubi [A]  time = 0.556834, antiderivative size = 330, normalized size of antiderivative = 1.2, number of steps used = 8, number of rules used = 6, integrand size = 31, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.194, Rules used = {3987, 98, 151, 12, 93, 205} \[ -\frac{a^3 \left (12 c^2-16 c d+7 d^2\right ) \tan (e+f x) \tan ^{-1}\left (\frac{\sqrt{c+d} \sqrt{a \sec (e+f x)+a}}{\sqrt{c-d} \sqrt{a-a \sec (e+f x)}}\right )}{4 f (c-d)^{5/2} (c+d)^{9/2} \sqrt{a-a \sec (e+f x)} \sqrt{a \sec (e+f x)+a}}+\frac{a^2 \left (16 c^2 d+2 c^3-59 c d^2+32 d^3\right ) \tan (e+f x)}{24 d f (c-d)^2 (c+d)^4 (c+d \sec (e+f x))}+\frac{a^2 \left (2 c^2+16 c d-21 d^2\right ) \tan (e+f x)}{24 d f (c-d) (c+d)^3 (c+d \sec (e+f x))^2}+\frac{a^2 (c+8 d) \tan (e+f x)}{12 d f (c+d)^2 (c+d \sec (e+f x))^3}-\frac{a^2 (c-d) \tan (e+f x)}{4 d f (c+d) (c+d \sec (e+f x))^4} \]

Antiderivative was successfully verified.

[In]

Int[(Sec[e + f*x]*(a + a*Sec[e + f*x])^2)/(c + d*Sec[e + f*x])^5,x]

[Out]

-(a^3*(12*c^2 - 16*c*d + 7*d^2)*ArcTan[(Sqrt[c + d]*Sqrt[a + a*Sec[e + f*x]])/(Sqrt[c - d]*Sqrt[a - a*Sec[e +
f*x]])]*Tan[e + f*x])/(4*(c - d)^(5/2)*(c + d)^(9/2)*f*Sqrt[a - a*Sec[e + f*x]]*Sqrt[a + a*Sec[e + f*x]]) - (a
^2*(c - d)*Tan[e + f*x])/(4*d*(c + d)*f*(c + d*Sec[e + f*x])^4) + (a^2*(c + 8*d)*Tan[e + f*x])/(12*d*(c + d)^2
*f*(c + d*Sec[e + f*x])^3) + (a^2*(2*c^2 + 16*c*d - 21*d^2)*Tan[e + f*x])/(24*(c - d)*d*(c + d)^3*f*(c + d*Sec
[e + f*x])^2) + (a^2*(2*c^3 + 16*c^2*d - 59*c*d^2 + 32*d^3)*Tan[e + f*x])/(24*(c - d)^2*d*(c + d)^4*f*(c + d*S
ec[e + f*x]))

Rule 3987

Int[(csc[(e_.) + (f_.)*(x_)]*(g_.))^(p_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_)*(csc[(e_.) + (f_.)*(x_)]
*(d_.) + (c_))^(n_), x_Symbol] :> Dist[(a^2*g*Cot[e + f*x])/(f*Sqrt[a + b*Csc[e + f*x]]*Sqrt[a - b*Csc[e + f*x
]]), Subst[Int[((g*x)^(p - 1)*(a + b*x)^(m - 1/2)*(c + d*x)^n)/Sqrt[a - b*x], x], x, Csc[e + f*x]], x] /; Free
Q[{a, b, c, d, e, f, g, m, n, p}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && (EqQ[p,
 1] || IntegerQ[m - 1/2])

Rule 98

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Simp[((b*c -
 a*d)*(a + b*x)^(m + 1)*(c + d*x)^(n - 1)*(e + f*x)^(p + 1))/(b*(b*e - a*f)*(m + 1)), x] + Dist[1/(b*(b*e - a*
f)*(m + 1)), Int[(a + b*x)^(m + 1)*(c + d*x)^(n - 2)*(e + f*x)^p*Simp[a*d*(d*e*(n - 1) + c*f*(p + 1)) + b*c*(d
*e*(m - n + 2) - c*f*(m + p + 2)) + d*(a*d*f*(n + p) + b*(d*e*(m + 1) - c*f*(m + n + p + 1)))*x, x], x], x] /;
 FreeQ[{a, b, c, d, e, f, p}, x] && LtQ[m, -1] && GtQ[n, 1] && (IntegersQ[2*m, 2*n, 2*p] || IntegersQ[m, n + p
] || IntegersQ[p, m + n])

Rule 151

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_))^(p_)*((g_.) + (h_.)*(x_)), x_Symb
ol] :> Simp[((b*g - a*h)*(a + b*x)^(m + 1)*(c + d*x)^(n + 1)*(e + f*x)^(p + 1))/((m + 1)*(b*c - a*d)*(b*e - a*
f)), x] + Dist[1/((m + 1)*(b*c - a*d)*(b*e - a*f)), Int[(a + b*x)^(m + 1)*(c + d*x)^n*(e + f*x)^p*Simp[(a*d*f*
g - b*(d*e + c*f)*g + b*c*e*h)*(m + 1) - (b*g - a*h)*(d*e*(n + 1) + c*f*(p + 1)) - d*f*(b*g - a*h)*(m + n + p
+ 3)*x, x], x], x] /; FreeQ[{a, b, c, d, e, f, g, h, n, p}, x] && LtQ[m, -1] && IntegerQ[m]

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 93

Int[(((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_))/((e_.) + (f_.)*(x_)), x_Symbol] :> With[{q = Denomin
ator[m]}, Dist[q, Subst[Int[x^(q*(m + 1) - 1)/(b*e - a*f - (d*e - c*f)*x^q), x], x, (a + b*x)^(1/q)/(c + d*x)^
(1/q)], x]] /; FreeQ[{a, b, c, d, e, f}, x] && EqQ[m + n + 1, 0] && RationalQ[n] && LtQ[-1, m, 0] && SimplerQ[
a + b*x, c + d*x]

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rubi steps

\begin{align*} \int \frac{\sec (e+f x) (a+a \sec (e+f x))^2}{(c+d \sec (e+f x))^5} \, dx &=-\frac{\left (a^2 \tan (e+f x)\right ) \operatorname{Subst}\left (\int \frac{(a+a x)^{3/2}}{\sqrt{a-a x} (c+d x)^5} \, dx,x,\sec (e+f x)\right )}{f \sqrt{a-a \sec (e+f x)} \sqrt{a+a \sec (e+f x)}}\\ &=-\frac{a^2 (c-d) \tan (e+f x)}{4 d (c+d) f (c+d \sec (e+f x))^4}+\frac{(a \tan (e+f x)) \operatorname{Subst}\left (\int \frac{-8 a^3 d-a^3 (c+7 d) x}{\sqrt{a-a x} \sqrt{a+a x} (c+d x)^4} \, dx,x,\sec (e+f x)\right )}{4 d (c+d) f \sqrt{a-a \sec (e+f x)} \sqrt{a+a \sec (e+f x)}}\\ &=-\frac{a^2 (c-d) \tan (e+f x)}{4 d (c+d) f (c+d \sec (e+f x))^4}+\frac{a^2 (c+8 d) \tan (e+f x)}{12 d (c+d)^2 f (c+d \sec (e+f x))^3}+\frac{\tan (e+f x) \operatorname{Subst}\left (\int \frac{-21 a^5 (c-d) d-2 a^5 (c-d) (c+8 d) x}{\sqrt{a-a x} \sqrt{a+a x} (c+d x)^3} \, dx,x,\sec (e+f x)\right )}{12 a d (c+d) \left (c^2-d^2\right ) f \sqrt{a-a \sec (e+f x)} \sqrt{a+a \sec (e+f x)}}\\ &=-\frac{a^2 (c-d) \tan (e+f x)}{4 d (c+d) f (c+d \sec (e+f x))^4}+\frac{a^2 (c+8 d) \tan (e+f x)}{12 d (c+d)^2 f (c+d \sec (e+f x))^3}+\frac{a^2 \left (2 c^2+16 c d-21 d^2\right ) \tan (e+f x)}{24 (c-d) d (c+d)^3 f (c+d \sec (e+f x))^2}+\frac{\tan (e+f x) \operatorname{Subst}\left (\int \frac{-2 a^7 (19 c-16 d) (c-d) d+a^7 (c-d) \left (21 d^2-2 c (c+8 d)\right ) x}{\sqrt{a-a x} \sqrt{a+a x} (c+d x)^2} \, dx,x,\sec (e+f x)\right )}{24 a^3 d (c+d) \left (c^2-d^2\right )^2 f \sqrt{a-a \sec (e+f x)} \sqrt{a+a \sec (e+f x)}}\\ &=-\frac{a^2 (c-d) \tan (e+f x)}{4 d (c+d) f (c+d \sec (e+f x))^4}+\frac{a^2 (c+8 d) \tan (e+f x)}{12 d (c+d)^2 f (c+d \sec (e+f x))^3}+\frac{a^2 \left (2 c^2+16 c d-21 d^2\right ) \tan (e+f x)}{24 (c-d) d (c+d)^3 f (c+d \sec (e+f x))^2}+\frac{a^2 \left (2 c^3+16 c^2 d-59 c d^2+32 d^3\right ) \tan (e+f x)}{24 (c-d)^2 d (c+d)^4 f (c+d \sec (e+f x))}+\frac{\tan (e+f x) \operatorname{Subst}\left (\int -\frac{3 a^9 (c-d) d \left (12 c^2-16 c d+7 d^2\right )}{\sqrt{a-a x} \sqrt{a+a x} (c+d x)} \, dx,x,\sec (e+f x)\right )}{24 a^5 d (c+d) \left (c^2-d^2\right )^3 f \sqrt{a-a \sec (e+f x)} \sqrt{a+a \sec (e+f x)}}\\ &=-\frac{a^2 (c-d) \tan (e+f x)}{4 d (c+d) f (c+d \sec (e+f x))^4}+\frac{a^2 (c+8 d) \tan (e+f x)}{12 d (c+d)^2 f (c+d \sec (e+f x))^3}+\frac{a^2 \left (2 c^2+16 c d-21 d^2\right ) \tan (e+f x)}{24 (c-d) d (c+d)^3 f (c+d \sec (e+f x))^2}+\frac{a^2 \left (2 c^3+16 c^2 d-59 c d^2+32 d^3\right ) \tan (e+f x)}{24 (c-d)^2 d (c+d)^4 f (c+d \sec (e+f x))}-\frac{\left (a^4 (c-d) \left (12 c^2-16 c d+7 d^2\right ) \tan (e+f x)\right ) \operatorname{Subst}\left (\int \frac{1}{\sqrt{a-a x} \sqrt{a+a x} (c+d x)} \, dx,x,\sec (e+f x)\right )}{8 (c+d) \left (c^2-d^2\right )^3 f \sqrt{a-a \sec (e+f x)} \sqrt{a+a \sec (e+f x)}}\\ &=-\frac{a^2 (c-d) \tan (e+f x)}{4 d (c+d) f (c+d \sec (e+f x))^4}+\frac{a^2 (c+8 d) \tan (e+f x)}{12 d (c+d)^2 f (c+d \sec (e+f x))^3}+\frac{a^2 \left (2 c^2+16 c d-21 d^2\right ) \tan (e+f x)}{24 (c-d) d (c+d)^3 f (c+d \sec (e+f x))^2}+\frac{a^2 \left (2 c^3+16 c^2 d-59 c d^2+32 d^3\right ) \tan (e+f x)}{24 (c-d)^2 d (c+d)^4 f (c+d \sec (e+f x))}-\frac{\left (a^4 (c-d) \left (12 c^2-16 c d+7 d^2\right ) \tan (e+f x)\right ) \operatorname{Subst}\left (\int \frac{1}{a c-a d-(-a c-a d) x^2} \, dx,x,\frac{\sqrt{a+a \sec (e+f x)}}{\sqrt{a-a \sec (e+f x)}}\right )}{4 (c+d) \left (c^2-d^2\right )^3 f \sqrt{a-a \sec (e+f x)} \sqrt{a+a \sec (e+f x)}}\\ &=-\frac{a^3 \left (12 c^2-16 c d+7 d^2\right ) \tan ^{-1}\left (\frac{\sqrt{c+d} \sqrt{a+a \sec (e+f x)}}{\sqrt{c-d} \sqrt{a-a \sec (e+f x)}}\right ) \tan (e+f x)}{4 (c-d)^{5/2} (c+d)^{9/2} f \sqrt{a-a \sec (e+f x)} \sqrt{a+a \sec (e+f x)}}-\frac{a^2 (c-d) \tan (e+f x)}{4 d (c+d) f (c+d \sec (e+f x))^4}+\frac{a^2 (c+8 d) \tan (e+f x)}{12 d (c+d)^2 f (c+d \sec (e+f x))^3}+\frac{a^2 \left (2 c^2+16 c d-21 d^2\right ) \tan (e+f x)}{24 (c-d) d (c+d)^3 f (c+d \sec (e+f x))^2}+\frac{a^2 \left (2 c^3+16 c^2 d-59 c d^2+32 d^3\right ) \tan (e+f x)}{24 (c-d)^2 d (c+d)^4 f (c+d \sec (e+f x))}\\ \end{align*}

Mathematica [A]  time = 9.69683, size = 322, normalized size = 1.17 \[ \frac{a^2 \left (\frac{\sin (e+f x) \left (-16 c^3 d^2 \cos (3 (e+f x))+5 c^2 d^3 \cos (3 (e+f x))+\left (208 c^3 d^2-785 c^2 d^3-172 c^4 d+144 c^5+368 c d^4+102 d^5\right ) \cos (e+f x)+2 \left (-227 c^3 d^2+32 c^2 d^3+96 c^4 d+12 c^5+44 c d^4+16 d^5\right ) \cos (2 (e+f x))-446 c^3 d^2+128 c^2 d^3-68 c^4 d \cos (3 (e+f x))+192 c^4 d+48 c^5 \cos (3 (e+f x))+24 c^5+16 c d^4 \cos (3 (e+f x))-148 c d^4+6 d^5 \cos (3 (e+f x))+160 d^5\right )}{(c \cos (e+f x)+d)^4}-\frac{24 \left (12 c^2-16 c d+7 d^2\right ) \tanh ^{-1}\left (\frac{(d-c) \tan \left (\frac{1}{2} (e+f x)\right )}{\sqrt{c^2-d^2}}\right )}{\sqrt{c^2-d^2}}\right )}{96 f (c-d)^2 (c+d)^4} \]

Antiderivative was successfully verified.

[In]

Integrate[(Sec[e + f*x]*(a + a*Sec[e + f*x])^2)/(c + d*Sec[e + f*x])^5,x]

[Out]

(a^2*((-24*(12*c^2 - 16*c*d + 7*d^2)*ArcTanh[((-c + d)*Tan[(e + f*x)/2])/Sqrt[c^2 - d^2]])/Sqrt[c^2 - d^2] + (
(24*c^5 + 192*c^4*d - 446*c^3*d^2 + 128*c^2*d^3 - 148*c*d^4 + 160*d^5 + (144*c^5 - 172*c^4*d + 208*c^3*d^2 - 7
85*c^2*d^3 + 368*c*d^4 + 102*d^5)*Cos[e + f*x] + 2*(12*c^5 + 96*c^4*d - 227*c^3*d^2 + 32*c^2*d^3 + 44*c*d^4 +
16*d^5)*Cos[2*(e + f*x)] + 48*c^5*Cos[3*(e + f*x)] - 68*c^4*d*Cos[3*(e + f*x)] - 16*c^3*d^2*Cos[3*(e + f*x)] +
 5*c^2*d^3*Cos[3*(e + f*x)] + 16*c*d^4*Cos[3*(e + f*x)] + 6*d^5*Cos[3*(e + f*x)])*Sin[e + f*x])/(d + c*Cos[e +
 f*x])^4))/(96*(c - d)^2*(c + d)^4*f)

________________________________________________________________________________________

Maple [A]  time = 0.146, size = 352, normalized size = 1.3 \begin{align*} 8\,{\frac{{a}^{2}}{f} \left ( -{\frac{1}{ \left ( \left ( \tan \left ( 1/2\,fx+e/2 \right ) \right ) ^{2}c- \left ( \tan \left ( 1/2\,fx+e/2 \right ) \right ) ^{2}d-c-d \right ) ^{4}} \left ( 1/32\,{\frac{ \left ( 12\,{c}^{2}-16\,cd+7\,{d}^{2} \right ) \left ( c-d \right ) \left ( \tan \left ( 1/2\,fx+e/2 \right ) \right ) ^{7}}{{c}^{4}+4\,{c}^{3}d+6\,{c}^{2}{d}^{2}+4\,c{d}^{3}+{d}^{4}}}-{\frac{ \left ( 132\,{c}^{2}-176\,cd+77\,{d}^{2} \right ) \left ( \tan \left ( 1/2\,fx+e/2 \right ) \right ) ^{5}}{96\,{c}^{3}+288\,{c}^{2}d+288\,{d}^{2}c+96\,{d}^{3}}}+{\frac{ \left ( 156\,{c}^{2}-272\,cd+83\,{d}^{2} \right ) \left ( \tan \left ( 1/2\,fx+e/2 \right ) \right ) ^{3}}{ \left ( 96\,c-96\,d \right ) \left ({c}^{2}+2\,cd+{d}^{2} \right ) }}-1/32\,{\frac{ \left ( 20\,{c}^{2}-48\,cd+25\,{d}^{2} \right ) \tan \left ( 1/2\,fx+e/2 \right ) }{ \left ( c+d \right ) \left ({c}^{2}-2\,cd+{d}^{2} \right ) }} \right ) }+1/32\,{\frac{12\,{c}^{2}-16\,cd+7\,{d}^{2}}{ \left ({c}^{6}+2\,{c}^{5}d-{c}^{4}{d}^{2}-4\,{c}^{3}{d}^{3}-{c}^{2}{d}^{4}+2\,c{d}^{5}+{d}^{6} \right ) \sqrt{ \left ( c+d \right ) \left ( c-d \right ) }}{\it Artanh} \left ({\frac{\tan \left ( 1/2\,fx+e/2 \right ) \left ( c-d \right ) }{\sqrt{ \left ( c+d \right ) \left ( c-d \right ) }}} \right ) } \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(f*x+e)*(a+a*sec(f*x+e))^2/(c+d*sec(f*x+e))^5,x)

[Out]

8/f*a^2*(-(1/32*(12*c^2-16*c*d+7*d^2)*(c-d)/(c^4+4*c^3*d+6*c^2*d^2+4*c*d^3+d^4)*tan(1/2*f*x+1/2*e)^7-11/96*(12
*c^2-16*c*d+7*d^2)/(c^3+3*c^2*d+3*c*d^2+d^3)*tan(1/2*f*x+1/2*e)^5+1/96*(156*c^2-272*c*d+83*d^2)/(c-d)/(c^2+2*c
*d+d^2)*tan(1/2*f*x+1/2*e)^3-1/32*(20*c^2-48*c*d+25*d^2)/(c+d)/(c^2-2*c*d+d^2)*tan(1/2*f*x+1/2*e))/(tan(1/2*f*
x+1/2*e)^2*c-tan(1/2*f*x+1/2*e)^2*d-c-d)^4+1/32*(12*c^2-16*c*d+7*d^2)/(c^6+2*c^5*d-c^4*d^2-4*c^3*d^3-c^2*d^4+2
*c*d^5+d^6)/((c+d)*(c-d))^(1/2)*arctanh(tan(1/2*f*x+1/2*e)*(c-d)/((c+d)*(c-d))^(1/2)))

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)*(a+a*sec(f*x+e))^2/(c+d*sec(f*x+e))^5,x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [B]  time = 0.836016, size = 4093, normalized size = 14.83 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)*(a+a*sec(f*x+e))^2/(c+d*sec(f*x+e))^5,x, algorithm="fricas")

[Out]

[1/48*(3*(12*a^2*c^2*d^4 - 16*a^2*c*d^5 + 7*a^2*d^6 + (12*a^2*c^6 - 16*a^2*c^5*d + 7*a^2*c^4*d^2)*cos(f*x + e)
^4 + 4*(12*a^2*c^5*d - 16*a^2*c^4*d^2 + 7*a^2*c^3*d^3)*cos(f*x + e)^3 + 6*(12*a^2*c^4*d^2 - 16*a^2*c^3*d^3 + 7
*a^2*c^2*d^4)*cos(f*x + e)^2 + 4*(12*a^2*c^3*d^3 - 16*a^2*c^2*d^4 + 7*a^2*c*d^5)*cos(f*x + e))*sqrt(c^2 - d^2)
*log((2*c*d*cos(f*x + e) - (c^2 - 2*d^2)*cos(f*x + e)^2 + 2*sqrt(c^2 - d^2)*(d*cos(f*x + e) + c)*sin(f*x + e)
+ 2*c^2 - d^2)/(c^2*cos(f*x + e)^2 + 2*c*d*cos(f*x + e) + d^2)) + 2*(2*a^2*c^5*d^2 + 16*a^2*c^4*d^3 - 61*a^2*c
^3*d^4 + 16*a^2*c^2*d^5 + 59*a^2*c*d^6 - 32*a^2*d^7 + (48*a^2*c^7 - 68*a^2*c^6*d - 64*a^2*c^5*d^2 + 73*a^2*c^4
*d^3 + 32*a^2*c^3*d^4 + a^2*c^2*d^5 - 16*a^2*c*d^6 - 6*a^2*d^7)*cos(f*x + e)^3 + (12*a^2*c^7 + 96*a^2*c^6*d -
239*a^2*c^5*d^2 - 64*a^2*c^4*d^3 + 271*a^2*c^3*d^4 - 16*a^2*c^2*d^5 - 44*a^2*c*d^6 - 16*a^2*d^7)*cos(f*x + e)^
2 + (8*a^2*c^6*d + 64*a^2*c^5*d^2 - 208*a^2*c^4*d^3 + 16*a^2*c^3*d^4 + 221*a^2*c^2*d^5 - 80*a^2*c*d^6 - 21*a^2
*d^7)*cos(f*x + e))*sin(f*x + e))/((c^12 + 2*c^11*d - 2*c^10*d^2 - 6*c^9*d^3 + 6*c^7*d^5 + 2*c^6*d^6 - 2*c^5*d
^7 - c^4*d^8)*f*cos(f*x + e)^4 + 4*(c^11*d + 2*c^10*d^2 - 2*c^9*d^3 - 6*c^8*d^4 + 6*c^6*d^6 + 2*c^5*d^7 - 2*c^
4*d^8 - c^3*d^9)*f*cos(f*x + e)^3 + 6*(c^10*d^2 + 2*c^9*d^3 - 2*c^8*d^4 - 6*c^7*d^5 + 6*c^5*d^7 + 2*c^4*d^8 -
2*c^3*d^9 - c^2*d^10)*f*cos(f*x + e)^2 + 4*(c^9*d^3 + 2*c^8*d^4 - 2*c^7*d^5 - 6*c^6*d^6 + 6*c^4*d^8 + 2*c^3*d^
9 - 2*c^2*d^10 - c*d^11)*f*cos(f*x + e) + (c^8*d^4 + 2*c^7*d^5 - 2*c^6*d^6 - 6*c^5*d^7 + 6*c^3*d^9 + 2*c^2*d^1
0 - 2*c*d^11 - d^12)*f), 1/24*(3*(12*a^2*c^2*d^4 - 16*a^2*c*d^5 + 7*a^2*d^6 + (12*a^2*c^6 - 16*a^2*c^5*d + 7*a
^2*c^4*d^2)*cos(f*x + e)^4 + 4*(12*a^2*c^5*d - 16*a^2*c^4*d^2 + 7*a^2*c^3*d^3)*cos(f*x + e)^3 + 6*(12*a^2*c^4*
d^2 - 16*a^2*c^3*d^3 + 7*a^2*c^2*d^4)*cos(f*x + e)^2 + 4*(12*a^2*c^3*d^3 - 16*a^2*c^2*d^4 + 7*a^2*c*d^5)*cos(f
*x + e))*sqrt(-c^2 + d^2)*arctan(-sqrt(-c^2 + d^2)*(d*cos(f*x + e) + c)/((c^2 - d^2)*sin(f*x + e))) + (2*a^2*c
^5*d^2 + 16*a^2*c^4*d^3 - 61*a^2*c^3*d^4 + 16*a^2*c^2*d^5 + 59*a^2*c*d^6 - 32*a^2*d^7 + (48*a^2*c^7 - 68*a^2*c
^6*d - 64*a^2*c^5*d^2 + 73*a^2*c^4*d^3 + 32*a^2*c^3*d^4 + a^2*c^2*d^5 - 16*a^2*c*d^6 - 6*a^2*d^7)*cos(f*x + e)
^3 + (12*a^2*c^7 + 96*a^2*c^6*d - 239*a^2*c^5*d^2 - 64*a^2*c^4*d^3 + 271*a^2*c^3*d^4 - 16*a^2*c^2*d^5 - 44*a^2
*c*d^6 - 16*a^2*d^7)*cos(f*x + e)^2 + (8*a^2*c^6*d + 64*a^2*c^5*d^2 - 208*a^2*c^4*d^3 + 16*a^2*c^3*d^4 + 221*a
^2*c^2*d^5 - 80*a^2*c*d^6 - 21*a^2*d^7)*cos(f*x + e))*sin(f*x + e))/((c^12 + 2*c^11*d - 2*c^10*d^2 - 6*c^9*d^3
 + 6*c^7*d^5 + 2*c^6*d^6 - 2*c^5*d^7 - c^4*d^8)*f*cos(f*x + e)^4 + 4*(c^11*d + 2*c^10*d^2 - 2*c^9*d^3 - 6*c^8*
d^4 + 6*c^6*d^6 + 2*c^5*d^7 - 2*c^4*d^8 - c^3*d^9)*f*cos(f*x + e)^3 + 6*(c^10*d^2 + 2*c^9*d^3 - 2*c^8*d^4 - 6*
c^7*d^5 + 6*c^5*d^7 + 2*c^4*d^8 - 2*c^3*d^9 - c^2*d^10)*f*cos(f*x + e)^2 + 4*(c^9*d^3 + 2*c^8*d^4 - 2*c^7*d^5
- 6*c^6*d^6 + 6*c^4*d^8 + 2*c^3*d^9 - 2*c^2*d^10 - c*d^11)*f*cos(f*x + e) + (c^8*d^4 + 2*c^7*d^5 - 2*c^6*d^6 -
 6*c^5*d^7 + 6*c^3*d^9 + 2*c^2*d^10 - 2*c*d^11 - d^12)*f)]

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} a^{2} \left (\int \frac{\sec{\left (e + f x \right )}}{c^{5} + 5 c^{4} d \sec{\left (e + f x \right )} + 10 c^{3} d^{2} \sec ^{2}{\left (e + f x \right )} + 10 c^{2} d^{3} \sec ^{3}{\left (e + f x \right )} + 5 c d^{4} \sec ^{4}{\left (e + f x \right )} + d^{5} \sec ^{5}{\left (e + f x \right )}}\, dx + \int \frac{2 \sec ^{2}{\left (e + f x \right )}}{c^{5} + 5 c^{4} d \sec{\left (e + f x \right )} + 10 c^{3} d^{2} \sec ^{2}{\left (e + f x \right )} + 10 c^{2} d^{3} \sec ^{3}{\left (e + f x \right )} + 5 c d^{4} \sec ^{4}{\left (e + f x \right )} + d^{5} \sec ^{5}{\left (e + f x \right )}}\, dx + \int \frac{\sec ^{3}{\left (e + f x \right )}}{c^{5} + 5 c^{4} d \sec{\left (e + f x \right )} + 10 c^{3} d^{2} \sec ^{2}{\left (e + f x \right )} + 10 c^{2} d^{3} \sec ^{3}{\left (e + f x \right )} + 5 c d^{4} \sec ^{4}{\left (e + f x \right )} + d^{5} \sec ^{5}{\left (e + f x \right )}}\, dx\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)*(a+a*sec(f*x+e))**2/(c+d*sec(f*x+e))**5,x)

[Out]

a**2*(Integral(sec(e + f*x)/(c**5 + 5*c**4*d*sec(e + f*x) + 10*c**3*d**2*sec(e + f*x)**2 + 10*c**2*d**3*sec(e
+ f*x)**3 + 5*c*d**4*sec(e + f*x)**4 + d**5*sec(e + f*x)**5), x) + Integral(2*sec(e + f*x)**2/(c**5 + 5*c**4*d
*sec(e + f*x) + 10*c**3*d**2*sec(e + f*x)**2 + 10*c**2*d**3*sec(e + f*x)**3 + 5*c*d**4*sec(e + f*x)**4 + d**5*
sec(e + f*x)**5), x) + Integral(sec(e + f*x)**3/(c**5 + 5*c**4*d*sec(e + f*x) + 10*c**3*d**2*sec(e + f*x)**2 +
 10*c**2*d**3*sec(e + f*x)**3 + 5*c*d**4*sec(e + f*x)**4 + d**5*sec(e + f*x)**5), x))

________________________________________________________________________________________

Giac [B]  time = 1.60067, size = 998, normalized size = 3.62 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)*(a+a*sec(f*x+e))^2/(c+d*sec(f*x+e))^5,x, algorithm="giac")

[Out]

1/12*(3*(12*a^2*c^2 - 16*a^2*c*d + 7*a^2*d^2)*(pi*floor(1/2*(f*x + e)/pi + 1/2)*sgn(-2*c + 2*d) + arctan(-(c*t
an(1/2*f*x + 1/2*e) - d*tan(1/2*f*x + 1/2*e))/sqrt(-c^2 + d^2)))/((c^6 + 2*c^5*d - c^4*d^2 - 4*c^3*d^3 - c^2*d
^4 + 2*c*d^5 + d^6)*sqrt(-c^2 + d^2)) - (36*a^2*c^5*tan(1/2*f*x + 1/2*e)^7 - 156*a^2*c^4*d*tan(1/2*f*x + 1/2*e
)^7 + 273*a^2*c^3*d^2*tan(1/2*f*x + 1/2*e)^7 - 243*a^2*c^2*d^3*tan(1/2*f*x + 1/2*e)^7 + 111*a^2*c*d^4*tan(1/2*
f*x + 1/2*e)^7 - 21*a^2*d^5*tan(1/2*f*x + 1/2*e)^7 - 132*a^2*c^5*tan(1/2*f*x + 1/2*e)^5 + 308*a^2*c^4*d*tan(1/
2*f*x + 1/2*e)^5 - 121*a^2*c^3*d^2*tan(1/2*f*x + 1/2*e)^5 - 231*a^2*c^2*d^3*tan(1/2*f*x + 1/2*e)^5 + 253*a^2*c
*d^4*tan(1/2*f*x + 1/2*e)^5 - 77*a^2*d^5*tan(1/2*f*x + 1/2*e)^5 + 156*a^2*c^5*tan(1/2*f*x + 1/2*e)^3 - 116*a^2
*c^4*d*tan(1/2*f*x + 1/2*e)^3 - 345*a^2*c^3*d^2*tan(1/2*f*x + 1/2*e)^3 + 199*a^2*c^2*d^3*tan(1/2*f*x + 1/2*e)^
3 + 189*a^2*c*d^4*tan(1/2*f*x + 1/2*e)^3 - 83*a^2*d^5*tan(1/2*f*x + 1/2*e)^3 - 60*a^2*c^5*tan(1/2*f*x + 1/2*e)
 - 36*a^2*c^4*d*tan(1/2*f*x + 1/2*e) + 177*a^2*c^3*d^2*tan(1/2*f*x + 1/2*e) + 147*a^2*c^2*d^3*tan(1/2*f*x + 1/
2*e) - 81*a^2*c*d^4*tan(1/2*f*x + 1/2*e) - 75*a^2*d^5*tan(1/2*f*x + 1/2*e))/((c^6 + 2*c^5*d - c^4*d^2 - 4*c^3*
d^3 - c^2*d^4 + 2*c*d^5 + d^6)*(c*tan(1/2*f*x + 1/2*e)^2 - d*tan(1/2*f*x + 1/2*e)^2 - c - d)^4))/f